#!/usr/bin/python3

import sys

filename=sys.argv[1]

interval = 0
fd = open(filename, 'r')
time=fd.readline().split()[0].strip()
fd.close()

mapers = 0.0
currentsum = 0.0
f = open(filename, 'r')
for line in f.readlines():
	current = line.split()[1].strip()
	ctime = line.split()[0].strip()
	if ctime==time:
		interval+=1
		mapers += float(current)
	else:
		if interval != 0:
			currentsum += (mapers/interval)
		interval = 1
		time = ctime
		mapers = float(current)

	
#	mas = float(current)*(1.0/interval)
#	currentsum+=mas

print('Current mas:' ,currentsum)
Ah = currentsum/(3600)

print('Charged ', Ah, 'mAh')
